"use client";
import { usePathname } from "next/navigation";
import { useDispatch } from "react-redux";
import { useEffect } from "react";
import useRouterTo from "@/hooks/routeTo";

/**前端页面中间件，用来处理一些全局数据判断，还有登录等。在根layout组件中引入 */
export default function Middleware() {
  const pathname = usePathname();
  const dispatch = useDispatch();
  const { routerTo } = useRouterTo();
  useEffect(() => {}, [pathname]);
  return <></>;
}
